import 'package:flutter/material.dart';
import 'package:niu_app/configs/app_style_config.dart';
import 'package:niu_app/pages/model/homepage/delegation_records_model.dart';
import 'package:niu_app/views/homepage/delegation_records_widget.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class delegation_records_page extends StatefulWidget {
  @override
  _delegation_records_pageState createState() => _delegation_records_pageState();
}

class _delegation_records_pageState extends State<delegation_records_page> {
  List notice=[
    {
      "time":"2020/07/20",
      "time1":"20:47:30",
      "title1":"成交",
      "title2":"开多",
      "color1":AppStyleConfig.background,
      "color2":AppStyleConfig.color3,
      "number":"40",
      "price":"11753.00",
      "number1":"9",
      "number2":"14",
      "number3":"9",
      "number4":"0",
      "number5":"0",
    },
    {
      "time":"2020/07/20",
      "time1":"20:47:30",
      "title1":"撤销",
      "title2":"开空",
      "color1":AppStyleConfig.color7,
      "color2":AppStyleConfig.color8,
      "number":"40",
      "price":"11753.00",
      "number1":"9",
      "number2":"14",
      "number3":"9",
      "number4":"0",
      "number5":"0",
    },
    {
      "time":"2020/07/20",
      "time1":"20:47:30",
      "title1":"挂单",
      "title2":"平多",
      "color1":AppStyleConfig.color9,
      "color2":AppStyleConfig.color3,
      "number":"40",
      "price":"11753.00",
      "number1":"9",
      "number2":"14",
      "number3":"9",
      "number4":"0",
      "number5":"0",
    },
    {
      "time":"2020/07/20",
      "time1":"20:47:30",
      "title1":"挂单",
      "title2":"平多",
      "color1":AppStyleConfig.background,
      "color2":AppStyleConfig.color3,
      "number":"40",
      "price":"11753.00",
      "number1":"9",
      "number2":"14",
      "number3":"9",
      "number4":"0",
      "number5":"0",
    }
  ];
  @override
  Widget build(BuildContext context) {
    return Container(
      height: 300.h,
      child: MediaQuery.removePadding(
          context: context,
          removeTop: true,
          child: ListView.builder(
            shrinkWrap: true,
            physics:NeverScrollableScrollPhysics(),
            scrollDirection: Axis.vertical,
            itemBuilder: (context,index){
              return delegationrecordswidget(
                dataModel: delegationmodel.fromJson(notice[index]),
              );
            },
            itemCount: notice.length,
          )
      ),
    );
  }
}
